-
Notifications
You must be signed in to change notification settings - Fork 7
mvtc empty #7348
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
base: develop
Are you sure you want to change the base?
mvtc empty #7348
Conversation
- JdbcType implements SimpleConvert - PropertyType implements SimpleConvert - ColumnInfo implements SimpleConvert - Unit implements SimpleConvert
- JdbcType implements SimpleConvert - PropertyType implements SimpleConvertmake JdbcType.CHAR.convert() consistent with JdbcType.VARCHAR - ColumnInfo implements SimpleConvert - Unit implements SimpleConvert
I'm not sure if the current callers handle FIELD_MARKER???.
update DomainKind.hasNullValues() to handle empty arrays, also a faster version.
| return new SqlSelector(ExperimentService.get().getSchema(), blankRowsSQL).exists(); | ||
| } | ||
|
|
||
| if (getTotalAndNonBlankSql(domain, prop, allRowsSQL, nonBlankRowsSQL)) |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
For non-provisioned domain, why do we need a second check if getBlanksSql(domain, prop, blankRowsSQL) is false?
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
I think there may be a case where the domain supports provisioning (null != getStorageSchemaName()), but no table has been created yet (null == domain.getStorageTableName()).
In that case both methods could return false. I just tried to keep the flow mostly the same.
| } final String name = col.getName(); | ||
|
|
||
|
|
||
|
|
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
yep should remove
| @Override | ||
| public boolean isEmpty(Object value) | ||
| { | ||
| if (null == value) |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Should we check for JSONArray to be consistent with other places?
NOTE: the refactor of the ConvertHelper is in another change list. I removed it from this PR to simplify it.
Rationale
For Array type required does not mean "IS NOT NULL" it means "cardinality() > 0".
Also for Multiple-choice text we prefer that null/"" converts to [] not to null.
To help implement this we consolidate column conversion into ColumnInfo.convert() and required/non-empty checking into JdbcType.isEmpty().
Related Pull Requests
Changes